<template>
  <div class="tender1">
    <Hedar></Hedar>

    <div class="logoImg">
    </div>
    <Listnav></Listnav>
    <div class="clicktoubiao">
      <div class="information_left">
        <div class="information_lefther">
          <p>{{dateall.projectName}}</p>
          <span></span>
        </div>
        <p class="information_title">项目详情</p>
        <table border="0" width='733px' id="myRelesad1" style="font-size:15px;text-align: left;vertical-align: super;">
          <tr>
            <td width="236" style="text-align: right;">项目类别 :</td><td>{{classifications}}</td>
          </tr>
          <tr>
            <td width="236" style="text-align: right;">招标单位 :</td> <td>{{dateall.tenderee}}</td>
          </tr>
          <tr>
            <td style="text-align: right;">招标地址 :</td><td>{{dateall.tenderAddress}} </td>
          </tr>
          <tr>
            <td style="text-align: right;">招标代理机构 :</td><td>{{dateall.tenderCompany}} </td>
          </tr>
          <tr>
            <td style="text-align: right;">工期时间 :</td><td>{{dateall.schedule}} 日历天 </td>
          </tr>
          <tr>
            <td style="text-align: right;">质量要求 :</td><td>合格</td>
          </tr>
          <tr>
            <td style="text-align: right;">合同估算价 :</td><td>{{dateall.agreementPrice}} 元</td>
          </tr>
          <tr>
            <td  colspan="2" style="color:red;text-indent: 121px;"> <span v-if="dateall.contractStatus==0 ? show1:!show1">固定合同总价</span> <span v-if="dateall.billStatus==0 ? show1:!show1">增值税专用发票</span>  <span v-if="dateall.priceStatus==0 ? show1:!show1">超价废标</span> </td>
          </tr>
          <tr>
            <td style="text-align: right;">项目地点 :</td><td>{{dateall.projectLocation}} </td>
          </tr>
          <tr>
            <td style="text-align: right;">投标文件递交截止时间 :</td><td>{{format(dateall.endDate,'yyyy-MM-dd HH:mm:ss')}}</td>
          </tr>
          <tr>
            <td style="text-align: right;">投标保证金 :</td><td>{{dateall.tenderMoney}} 元 </td>
          </tr>
          <tr>
            <td style="text-align: right;">联系人 :</td><td>{{dateall.contactName}}</td>
          </tr>
          <tr>
            <td style="text-align: right;">联系电话 :</td><td>{{dateall.contactMobile}}</td>
          </tr>
          <tr>
            <td style="text-align: right;">其他项目说明 :</td><td rowspan="3">
            <el-input
              type="textarea"
              resize="none"
              :rows="4"
              :readonly="true"
              :autosize="{ minRows: 4, maxRows: 4}"
              :maxlength="500"
              placeholder=""
              v-model="textarea4">
            </el-input></td>
          </tr>
          <tr>
            <td style="text-align: right;"></td>
          </tr>
        </table>
        <p class="information_title1">附件下载</p>
        <p class="down_tip">
          <a :href=dateall.tenderFile> {{tenderFilename}}</a>
        </p>
        <router-link :to="{path:'/Tenderhalltip',query:{name:dateall.userid , tenderName:dateall.id ,mony:dateall.tenderMoney}}"><el-button type="success">我要投标</el-button></router-link>
      </div>

      <div class="information_right">
        <div class="pic_headr">

        </div>

            <!--<router-link :to="{path:'/Tenderhalltip', query:{name:dateall.userid , tenderName:dateall.id ,mony:dateall.tenderMoney}}"> <div class="btn_pic">我要投标</div></router-link>-->

      </div>

    </div>
    <Footers></Footers>

  </div>
</template>

<script>
  import Takeshow from "@/components/Takeshow"
  import Footers from'@/components/Footers'
  import Listnav from "@/components/Listnav"
  import Hedar from'@/components/Hedar'
  export default {
    data () {
      return {
        show1:true,
        dateall:{},
        classifications:'',
        tenderFilename:'',
        qqsssb: false,
        dialogVisible: false,
        dtaa:true,
        dialogFormVisible: false,
        form: {
          bidCompany: '',
          bidUser: '',
          bidPhone: '',
          bidMail: '',
          referrer: ''
        },
        formLabelWidth: '200px',
        butsata: '',
        textarea4: ''

      }
    },
    methods: {
      format(time, format) {
        var t = new Date(time);
        var tf = function(i){return (i < 10 ? '0' : '') + i};
        return format.replace(/yyyy|MM|dd|HH|mm|ss/g, function(a){
          switch(a){
            case 'yyyy':
              return tf(t.getFullYear());
              break;
            case 'MM':
              return tf(t.getMonth() + 1);
              break;
            case 'mm':
              return tf(t.getMinutes());
              break;
            case 'dd':
              return tf(t.getDate());
              break;
            case 'HH':
              return tf(t.getHours());
              break;
            case 'ss':
              return tf(t.getSeconds());
              break;
          }
        })
      },
      getLocalTime(nS){
    return new Date(parseInt(nS)).toLocaleString().replace(/年|月/g, "-").replace(/日/g, " ");
  },
  Jumptopay(){
        this.dialogFormVisible = false
        this.qqsssb = true
      },
      handleClose1s(done) {
        done();
      },
      averntr(data){
        this.dialogFormVisible=data
      },
      bqttr(data){
        this.dialogVisible=data

      },
      test () {
//        alert("关闭")
      },
      test1 () {
//        alert("确认")
      },
      ievents(data){
        console.log(data);// data为包含传过来所有数据的数组，第一个元素是对象，第二个元素是字符串
        this.dtaa=data
      },
      handleClose(done) {
//        done();
//        this.$confirm('确认关闭？')
//          .then(_ => {
//            done();
//          })
//          .catch(_ => {});
      },
      getQueryString(name){
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
        var r = window.location.href.split('?')[1].match(reg);
        if (r != null){
          return decodeURI(r[2]);
        }
        return null;
      },
      listone(){
        let that =this
        $.ajax({
          type: "post",
          url: local+"/awm/tender/selectByPrimaryName",
          data: {tenderId: this.getQueryString('id')},
          dataType: "json",
          beforeSend:function (xhr) {
            xhr. withCredentials=true
          },
          success: function(data){
            if(data.code==200){
             let dateall1=data.resultData.tender
              console.log(dateall1)
              that.dateall=dateall1
              that.textarea4=dateall1.explainl
              that.tenderFilename=data.resultData.tenderFile
              if(dateall1.classification==2){
                that.classifications='单一采购'
              }else if(dateall1.classification==3){
                that.classifications='采购及安装'
              }else if(dateall1.classification==4){
                that.classifications='纯劳务'
              }else if(dateall1.classification==5){
                that.classifications='专业分包'
              }

            }
          },
          error:function(aa){
              console.log(aa)
          }
        });
      }

    },
    mounted () {
      this.listone()
    },
    components: {
      Listnav,
      Takeshow,
      Hedar,
      Footers
    }
  }
</script>
<style scoped>
  p{margin:0;padding:0;}
  .tender1{
    width:100%;
    height:1452px;
    /*background: url("../assets/dsbbbbb1.png");*/
  }
  .bbqc .el-dialog {
    width:800px;
    height:400px;
  }
  .logoImg{
    width:100%;
    height:120px;
    background:url(../assets/logobig1.png) no-repeat 0 0;
    overflow: hidden;
  }
  .logoImg .lOgin_search{
    width:490px;
    height:38px;
    margin:40px 0 0 282px;
  }
  .logoImg .lOgin_search input{
    width:408px;
    height:36px;
    background: #eaeaea;
    float:left;
    border:1px solid #ff8328;
  }
  .logoImg .lOgin_search span{
    width:80px;
    height:38px;
    line-height: 38px;
    background:#ff8328;
    float:left;
    color:#eff4fa;
  }
  .logoImg .lOgin_search span:hover{
    cursor: pointer;
  }
  .banner{
    width:100%;
    height:420px;
    background:palevioletred;
  }
  .clicktoubiao{
    width:1230px;
    height:1060px;
    margin:14px auto 40px;
    overflow: hidden;

  }
  .information_left{
    width:809px;
    height:1058px;
    background:#fff;
    overflow: hidden;
    float:left;
    padding-left:40px;
  }
  .information_lefther{
    width:768px;
    height:66px;
    border-bottom:1px solid #bfbfbf;
    margin-top:9px;
    text-align: left;
  }
  .information_lefther p{
    font-size: 24px;

    display: inline-block;
    vertical-align: middle;

  }
  .information_lefther span{
    display: inline-block;
    height:100%;
    vertical-align: middle;
  }
  .information_title,.information_title1{
    width:200px;
    height:40px;
    font-size: 20px;
    line-height:60px;
    text-align:left;
    text-indent:30px;
    font-weight: bold;
  }
  .down_tip{
    width:calc(100% - 26px);
    height:75px;
    line-height:75px;
    text-align: left;
    padding-left:26px;
  }
  .down_tip a:hover{
    color:red;
  }
  #myRelesad1 tr{
    height:48px;
  }
  #myRelesad1 tr td{
    font-size: 19px;
  }
  #myRelesad1 tr td:nth-child(2){
    padding-left:40px;
    width:457px;
  }
  .title_tb{
    width:100%;
    height:50px;
    line-height:50px;
    text-align: left;
    text-indent: 20px;
    margin-top:30px;
  }
  .el-button{
    width: 66%;
    /*float: left;*/
    /*margin:60px auto 40px;*/
    /*padding:60px;*/
    font-size: 25px;
  }
  .el-button--success {
    color: #fff;
    background-color: #ff8328;
    border-color: #ff8328;
  }

  .information_right{
    width:380px;
    height:1058px;
    float:right;
    background:#fff;
  }
  .information_right .pic_headr{
    width:380px;
    height:260px;
    background:url("../assets/kunpeng1.png") no-repeat left top;
  }
  .btn_pic{
    width: 200px;
    background:url("../assets/letsgo.png");
    background-size: 200px 200px;
    margin:60px auto 40px;
   height:200px;
    line-height:140px;
    color:#fff;
    font-size: 25px;
  }
  .btn_pic:hover{
    cursor: pointer;
  }
</style>
